<?php
    include_once('connection.php');
    
    if(isset($_GET['id']))
    {
		
		$id = $_GET['id'];
        $str = "SELECT * FROM tintuc WHERE ID=$id";
        $sql = mysql_query($str);
        $row = mysql_fetch_assoc($sql);
        $fn = $row['F_URL'];
        
        echo "<h1 style='text-decoration:none;'>".$row['TIEUDE']."</h1>";
		echo "<font color='#0066FF'>".$row['THOIGIAN']."</font>";
        echo "<p>".$row['NOIDUNG']."</p>";
		$file = explode(";",$fn);
		$count = count($file);
        
		if($fn != "")
		{
			  echo "<br/><br/><font style='font-weight:bold'>Các file đính kèm:</font><br/>";
			  for($i=0;$i<$count;$i++)
			  {
				  $pos = strrpos($file[$i],'/');
				 $fnames = substr($file[$i],$pos+1);
			  	echo"<a class='news' href='admin/tintuc/".$file[$i]."' target='_blank' title='$file[$i]'>$fnames</a><br/>";
			  }
		}
    }
?>